package de.koller.worlders.render.visual;

import de.koller.oceanFramework.gl.util.ParticleTexture;
import de.koller.worlders.WSea;
import de.koller.worlders.engine.entity.IRenderable;
import de.koller.worlders.render.util.TextureRep;

public class RenderObject extends WSea implements IRenderable {
	
	private TextureRep textureRep = null;
	private ParticleTexture texture;

	public RenderObject( TextureRep texture ) {
		this.textureRep = texture;
	}

	public RenderObject( int color ) {
		this( new TextureRep( color ) );
	}

	@Override
	public ParticleTexture getTexture() {
		return texture;
	}

	@Override
	public void setTexture( ParticleTexture texture ) {
		this.texture = texture;
	}
	
	public void setTextureRep( TextureRep textureRep ) {
//		if( this instanceof Tile )
//			((Tile)this).getTileV().releaseDisplayList();
		texture = null;
		this.textureRep = textureRep;
	}

	@Override
	public TextureRep getTextureRep() {
		return textureRep;
	}

	@Override
	public void renderObject( float x, float y, float w, float h, float z, boolean fast ) {
		throw new UnsupportedOperationException( "Not supported yet." );
	}

	@Override
	public boolean isVisible() {
		throw new UnsupportedOperationException( "Not supported yet." );
	}

	@Override
	public void setMirrorX( boolean mirrorX ) {
		throw new UnsupportedOperationException( "Not supported yet." );
	}

	@Override
	public void setMirrorY( boolean mirrorY ) {
		throw new UnsupportedOperationException( "Not supported yet." );
	}

	@Override
	public void setRenderColor( int renderColor ) {
		throw new UnsupportedOperationException( "Not supported yet." );
	}

	@Override
	public void setRotation( float rotation ) {
		throw new UnsupportedOperationException( "Not supported yet." );
	}

	@Override
	public void setRotationOffsetX( float ox ) {
		throw new UnsupportedOperationException( "Not supported yet." );
	}

	@Override
	public void setRotationOffsetY( float oy ) {
		throw new UnsupportedOperationException( "Not supported yet." );
	}

	
}
